Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Notes and Domino Application Development wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL Forums and Blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • API Documentation
Search
Community Articles > Developing Applications > Developing XPage Applications > Computed Datasource Application
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Make a field required when emulating computed when composed

1) Set visible property to true 2) create a computed field with the formula: getComponent(Id of above field).getValue() 3) select source tab and enter the div tag before and div tag after your field code as below, but not to include your computed field The reason for doing it this way is ...

Making a read only field be required

Validating a Read Only field By default a field set to be read only cannot be required, but with a little help from my friend Chris Toohey you can add a div tag with a style to make it work like shown below: div style"display: none;"      xp:inputText           id"rptToName1" ...

Computed Datasource Application

If you are required to develop in a development environment before going to production, then the below might be helpful if you need to use another database for your datasource where there is a copyreplica of this in your development environment and production environment. var curServer ...
Community articleComputed Datasource Application
Added by ~Martha Refanater | Edited by ~Martha Refanater on July 8, 2011 | Version 2
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
No abstract provided.
Tags: xpages, Datasource

If you are required to develop in a development environment before going to production, then the below might be helpful if you need to use another database for your datasource where there is a copy/replica of this in your development environment and production environment.


var curServer = @Subset(@DbName(),1);

var tdTest = []; --- creates new array

tdTest.push(curServer);

tdTest.push("folder\\filename.nsf");

var tdProd = []; --- creates new array

tdProd.push(curServer);

tdProd.push("filename.nsf");

if(curServer.toLowerCase().slice(-3) == "dev") { --- slice is similar to using @Left, @Middle, @Right

     tdTest[1];

} else {

    tdProd[1];

}
 
The view will have to be manually typed as computing the application doesn't seem to allow a collection of database views to be presented.  I am dynamically computing the value so I don't think doing it on page load will make any difference.

  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (2)
collapsed Versions (2)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (2)Jul 8, 2011, 1:31:26 PM~Martha Refanater  added sentence about application view
1Jul 7, 2011, 8:35:08 PM~Ted Lopresonobu  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL
  • Privacy
  • Accessibility